<template>
  <div class="container">
    <div class="chj_wenti_template chj_particulars_template">
      <div class="chj_juzhong">
        <div class="chj_w_com chj_wt_shadow">
          当前位置 ：
          <a class="chj_w_com_a" href="/"> 网站首页 > </a>
          <a class="chj_w_com_a" href="javascript:;"> 疑问解答 </a>
        </div>
        <div class="chj_particulars_content">
          <div class="chj_parcontent_left">
            <div class="chj_pcont_le_item1">
            	
              <h3>{{this.title.nn?this.title.nn.data.title:[]}}</h3>
              <p class="chj_pli_record">
                分类: <span style="color: #666666;text-indent: 10px;">{{this.title.nn?this.title.nn.data.cate_title:[]}}</span>
                <span class="chj_weilei">浏览:{{this.title.nn?this.title.nn.data.number:[]}}次</span>
                <span>{{this.title.nn?this.title.nn.data.updatetime:[]}}</span>
              </p>
              <p style="color: #212529;line-height: 16px;">
              	{{this.title.nn?this.title.nn.data.content:[]}}
              	
              </p>
            </div>
            
            <div class="chj_pcont_le_item2">
              <h4 class="chj_pcont_le_item2_title">{{this.title.yn?this.title.yn.data.length:''}}个回答<i></i></h4>
              <div class="chj_pcont_le_item2_content" v-for="(i,index) in this.title.yn.data?this.title.yn.data:[]" :key='index'>
                <div class="chj_pcont_le_item2_huifu">
                  <em>答</em>
                  <p>{{i?i.content:''}}</p>
                  <span>{{i?i.updatetime:''}}</span>
                </div>
                <div class="chj_pcont_le_item2_list">
                	
                  <div v-bind:class="'chj_pcont_le_item2_list_left chj_item2_le_img'+index">
                  	<img style="width: 100%;height: 100%;" :src="'https://exam.zhonghaiqihang.com/'+i.avatar"/>
                  </div>
                  <div class="chj_pcont_le_item2_list_right">
                    <h5>{{i?i.username:''}}</h5>
                    <p>回答数: <span class="chj_pacont_num">256</span><i>|</i>浏览次数: <span class="chj_pacont_num">{{i?i.number:''}}</span>次</p>
                    <ul>
                      <li class="chj_item2_list_li1">工商顾问</li>
                      <li class="chj_item2_list_li2">
                        擅长业务:工商注册 、商标注册、财税服务、人事社保、建筑资质
                      </li>
                    </ul>
                  </div>
                </div>
              </div>

            </div>
            <ul class="chj_pcont_le_item2 chj_pcont_le_item3">
              <li class="chj_par_list_title">相关问题</li>
              <li class="chj_le_list chj_module_list chj_wenti_list chj_wpadd" v-for="(i,index) in xg" :key="index">
                <p class="chj_le_list_left chj_wlist_left">
                  <span><a target="_blank" :href="'/questionDetails/'+i.id" class="chj_list_a" >{{i?i.title:''}}</a></span>
                  <span class="chj_par_list_zhuce"> [{{i?i.cate_title:''}}] </span>
                </p>
                <p class="chj_le_list_right chj_wlist_right chj_wtrig">
                  <span>{{i?i.updatetime:''}}</span>
                </p>
              </li>
            </ul>
          </div>
          <div class="chj_parcontent_right">
            <div class="chj_parcontent_right_renmen">
              <h5 class="chj_par_rtitle">热门问答</h5>
              <ul class="chj_par_r_tuilist chj_par_r_renlist" v-for="(i,index) in this.title.aa.data" :key='index'>
            <li class="chj_par_r_renlist_li1"> <a style="color: #212529;" :href="'/questionDetails/'+i.id" target="_blank"><i></i><span>{{i?i.content:''}}</span></a></li>
                <li class="chj_par_r_renlist_li2">{{i?i.updatetime:''}}</li>
              </ul>
            </div>
          </div>
        </div>
        
      </div>
    </div>
    <my-ft></my-ft>
  </div>

</template>

<script>
  import axios from 'axios';
  import $ from 'jquery';
  export default {
    name: 'HelloWorld',
    data() {
      return {
      	id:this.$route.params.id,
        chj_par_content: '您好，一般是1-3个工作日。您好，一般是1-3个工作日。您好，一般是1-3个工作日。您好，一般是1-3个工作日。您好，一般是1-3个工作日。',							      	
      	xg:[],
      }
    },
    async asyncData({
      params
    }) {
    let nh = await axios.get(`https://exam.zhonghaiqihang.com/PInterface/Header/headerData`);
    let yn = await axios.get(`https://exam.zhonghaiqihang.com/PInterface/Answer`,{
      params:{
        problem_id:params.id
      }});
      let nn = await axios.get(`https://exam.zhonghaiqihang.com/PInterface/Problem/detail`,{
      params:{
        problem_id:params.id
      }});
      
      let xg = await axios.get(`https://exam.zhonghaiqihang.com/PInterface/Problem`,{
      params:{
        cate_id:1,
      }});
            let aa = await axios.get(`https://exam.zhonghaiqihang.com/PInterface/Problem`,{
      params:{
        hot:1,
      }});
      let data = {
      nn:nn.data,	
      nav: nh.data,
      yn:yn.data,
      xg:xg.data,
      aa:aa.data
    };
    return {
      title: data
    }
  },
    head () {
    return {
      title: this.title.nn.data.title,
      meta: [
        { hid: 'description', name: 'description', content: '企业邦-24小时免费服务:400-855-1888,为企业提供加急注册公司,提供注册地址,变更,注销,商标注册,公司转让,代理记账,国家局核名,疑难核名,解除税务异常,解公司地址异常,年报异常,公司收购,资质代办,建筑施工资质,总承包资质,专业承包资质,劳务资质,代办执照,北京公司户车指标,购车指标,车号,食品经营许可证,广播电视节目许可,联网资质,直播资质,人力资源劳务派遣,旅行社资质,知识产权代理,税收筹划等专业的全方位企业服务.' },
        { hid: 'keywords', name: 'keywords', content: '企业邦业务范围,企业邦服务对象,企业邦联系方式' }
      ]
  }
  },
  mounted: function() {
  	
  	var _this = this;
  	      _this.$axios.get('api/PInterface/Problem',{
        params:{
          cate_id:_this.title.nn.data.cate_id
        }
      })
        .then(function(response){
        	_this.xg = response.data.data
          console.log(response.data.data)
        });
		console.log(this.title.nn.data.cate_id)
  	console.log(this.$route.params)
		console.log(this.title)
  },

  methods: {
			
  }
  }
</script>

<style scoped>

</style>
